import global from '@/util/global'
import { CustomerTypeFormatter } from '@/const/dict'

export function colunms () {
    return {
        warehouseColumns: [
            { label: '仓库名称', width: 160, prop: 'warehouseName', align: 'center' },
            { label: '创建时间', width: 100, prop: 'createTime', align: 'center' }
        ],
        materialTypeColumns: [
            { label: '类型名称', width: 160, prop: 'typeName', align: 'center' },
            { label: '创建时间', width: 100, prop: 'createTime', align: 'center' }
        ],
        customerColumns: [
            { label: '客户名称', width: 260, prop: 'customerName', align: 'center' },
            { label: '联系人', width: 160, prop: 'linkName', align: 'center' },
            { label: '客户类型', width: 100, prop: 'customerType', align: 'center', formatter: CustomerTypeFormatter },
            { label: '联系电话', width: 160, prop: 'linkMoblie', align: 'center' },
            { label: '创建时间', width: 100, prop: 'createTime', align: 'center' }
        ],
        modelColumns: [
            { label: '名称', width: 260, prop: 'name', align: 'center' },
            { label: global.modelName, width: 80, prop: 'modelName', align: 'center' },
            { label: global.modelProp, width: 110, prop: 'modelProp', align: 'center' },
            { label: '类型', width: 180, prop: 'materialTypeName', align: 'center' },
            { label: '单位', width: 80, prop: 'unit', align: 'center' }
        ],
        stepColumns: [
            { label: '名称', width: 120, prop: 'stepName', align: 'center' }
        ],
        purchaseColumns: [
            { label: '采购单号', width: 180, prop: 'orderNo', align: 'center' },
            { label: '仓库名称', width: 120, prop: 'warehouseName', align: 'center' },
            { label: '客户名称', width: 200, prop: 'customerName', align: 'center' },
            { label: '数量', width: 80, prop: 'quantity', align: 'center' },
            { label: '入库数量', width: 80, prop: 'finishQuantity', align: 'center' },
            { label: '总价', width: 100, prop: 'totalAmount', align: 'center' },
            { label: '订单号', width: 180, prop: 'businessOrderNo', align: 'center' },
            { label: '创建时间', width: 100, prop: 'createTime', align: 'center' }
        ],
        orderColumns: [
            { label: '订单号', width: 180, prop: 'orderNo', align: 'center' },
            { label: '客户名称', width: 260, prop: 'customerName', align: 'center' },
            { label: '数量', width: 120, prop: 'quantity', align: 'center' },
            // { label: '订单状态', width: 120, prop: 'orderStatus', align: 'center' },
            { label: '发货时间', width: 180, prop: 'sendTime', align: 'center' },
            { label: '创建时间', width: 100, prop: 'createTime', align: 'center' }
        ],
        userColumns: [
            { label: '用户名', width: 140, prop: 'userName', align: 'center' },
            { label: '邮箱', width: 180, prop: 'email', align: 'center' },
            { label: '部门', width: 200, prop: 'deptName', align: 'center' },
            { label: '职位', width: 120, prop: 'positionName', align: 'center' },
            { label: '手机号码', width: 120, prop: 'mobile', align: 'center' }
        ],
        goodsColumns: [
            { label: global.modelName, width: 100, prop: 'modelName', align: 'center' },
            { label: global.modelProp, width: 80, prop: 'modelProp', align: 'center' },
            { label: '物料名称', width: 260, prop: 'materialName', align: 'center' },
            { label: '物料类型', width: 120, prop: 'materialTypeName', align: 'center' },
            { label: '卷数', width: 100, prop: 'total', align: 'center' },
            { label: '数量', width: 100, prop: 'quantity', align: 'center' },
            { label: '单位', width: 80, prop: 'unit', align: 'center' },
            { label: '序列号', width: 160, prop: 'serialNumber', align: 'center' },
            { label: '批次号', width: 160, prop: 'batchNo', align: 'center' }
        ]
    }
}
